JBoss Community Archive (Read Only)

GateIn WCM

1. Getting Started

The following steps describe requeriments, installation and configuration steps for GateIn WCM.

1.1 Requeriments

  • JDK 1.7

  • Maven3

  • Git

  • GateIn Portal 3.6.0 for JBoss AS7 or JBoss Portal 6.1

1.2 Building

1.2.1 Check your maven repositories

GateIn WCM needs two repositories in your maven settings.xml, you can add the following repositories into your maven configuration:

<settings>
  <profiles>
    <profile>
      <id>jboss-public-repository</id>
      <repositories>
        <repository>
          <id>jboss-public-repository-group</id>
          <name>JBoss Public Maven Repository Group</name>
          <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>jboss-public-repository-group</id>
          <name>JBoss Public Maven Repository Group</name>
          <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

    <profile>
      <id>exo-public-repository</id>
      <repositories>
        <repository>
          <id>exo-public-repository-group</id>
          <name>eXo Public Maven Repository Group</name>
          <url>http://repository.exoplatform.org/content/groups/public</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>exo-public-repository-group</id>
          <name>eXo Public Maven Repository Group</name>
          <url>http://repository.exoplatform.org/content/groups/public</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>jboss-public-repository</activeProfile>
    <activeProfile>exo-public-repository</activeProfile>
  </activeProfiles>
</settings>

1.2.2 Get source

GateIn WCM code can be cloned with the following steps:

[lucas@jan13 test-wcm]$ git clone https://github.com/gatein/gatein-wcm
Cloning into 'gatein-wcm'...
remote: Counting objects: 2010, done.
remote: Compressing objects: 100% (1330/1330), done.
remote: Total 2010 (delta 879), reused 1549 (delta 421)
Receiving objects: 100% (2010/2010), 3.08 MiB | 889.00 KiB/s, done.
Resolving deltas: 100% (879/879), done.
[lucas@jan13 test-wcm]$

1.2.3 Build 

GateIn WCM can be built with the following steps:

[lucas@jan13 test-wcm]$ cd gatein-wcm
[lucas@jan13 gatein-wcm]$ mvn clean install

...

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] wcm-parent ........................................ SUCCESS [0.262s]
[INFO] wcm-api ........................................... SUCCESS [1.219s]
[INFO] wcm ............................................... SUCCESS [3.519s]
[INFO] api-example ....................................... SUCCESS [0.559s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.854s
[INFO] Finished at: Fri Oct 25 12:10:00 CEST 2013
[INFO] Final Memory: 26M/323M
[INFO] ------------------------------------------------------------------------

1.3 Installation

Before install GateIn WCM check you have a correct installation of GateIn Portal 3.6.0 for JBoss AS7 or JBoss Portal 6.1

1.3.1 Update fileuploads dependency

  • In GateIn Portal open

$GATEIN/modules/org/apache/commons/fileupload/main/module.xml
  • In JBoss Portal open

$JPP/jboss-jpp-6.1/modules/system/add-ons/gatein/org/apache/commons/fileupload/main/module.xml
  • Add org.apache.commons.io dependency:

    <dependencies>
        [...]
        <module name="org.apache.commons.io" />
        [...]
    </dependencies>

1.3.2 Install wcmDS datasource

For demo porpuses we are using h2 database embedded in GateIn Portal / JBoss Portal, but GateIn WCM is compatible with any database with JPA / Hibernate SQL dialect.

  • In GateIn Portal or JBoss Portal open

$GATEIN/standalone/configuration/standalone.xml
  • Add a new datasource:

     [...]
     <datasource jndi-name="java:jboss/datasources/wcmDS" pool-name="wcmDS" enabled="true" use-java-context="true">
        <connection-url>jdbc:h2:file:${jboss.server.data.dir}/wcm/db/wcm_database;DB_CLOSE_DELAY=-1;AUTO_SERVER=TRUE</connection-url>
        <driver>h2</driver>
        <security>
            <user-name>sa</user-name>
            <password>sa</password>
        </security>
    </datasource>
    [...]

1.3.3 Install wcm.properties

  • Browse in GateIn WCM project and locate examples/configuration-example/wcm.properties

$PROJECT/examples/configuration-example/wcm.properties
  • Install properties

Copy $PROJECT/examples/configuration-example/wcm.properties file into $GATEIN/standalone/configuration

1.3.4 Deploy wcm.war artifact

  • Check you have built GateIn WCM Project in step 1.2

Copy $PROJECT/wcm/target/wcm.war to $GATEIN/standalone/deployments

1.4 Configuration

1.4.1 Start GateIn Portal or JBoss Portal

  • Launch

cd $GATEIN / cd $JPP
bin/standalone.sh
  • Open a browser and check (assuming you are in a localhost installation)

http://localhost:8080/portal

images/author/download/attachments/75137355/wcm-1.4.1.png

1.4.2 Configuration of GateIn WCM groups

  • Access GateIn Portal / JBoss Portal as root user

  • Access to Group > Organization > Users and groups management

images/author/download/attachments/75137355/wcm-1.4.2-b.png

  • Create a new group from root parent called wcm

images/author/download/attachments/75137355/wcm-1.4.2-c.png

  • Create a new group under /wcm called editor

images/author/download/attachments/75137355/wcm-1.4.2-d.png

/wcm group represents all users that can access to GateIn WCM Editor portlet.

/wcm/editor represents a group with write rights.

Additional groups can be created under /wcm group to define fine grained permission in the WCM tool.

1.4.3 Configuration of GateIn WCM application

  • Access GateIn Portal / JBoss Portal as root user

  • Access to Group > Administration > Application Registry

images/author/download/attachments/75137355/wcm-1.4.3-b.png

  • Add a new category called WCM, set permission to all members of /wcm group.

images/author/download/attachments/75137355/wcm-1.4.3-c.1.png images/author/download/attachments/75137355/wcm-1.4.3-c.2.png

  • Add WCM Content application to WCM category.

images/author/download/attachments/75137355/wcm-1.4.3-d.png

  • Add WCM Editor application to WCM category, set permission to all members of /wcm group.

images/author/download/attachments/75137355/wcm-1.4.3-e.png

1.4.4 Configuration of GateIn WCM navigation

  • Access GateIn Portal / JBoss Portal as root user

  • Access to Group > Manage Groups

images/author/download/attachments/75137355/wcm-1.4.4-b.png

  • Add Navigation for /wcm group

images/author/download/attachments/75137355/wcm-1.4.4-c.png

  • Edit /wcm Navigation and Add Node

images/author/download/attachments/75137355/wcm-1.4.4-d.png

  • In Page Node Setting tab: Add new Node called wcm with label WCM Editor

images/author/download/attachments/75137355/wcm-1.4.4-e.png

  • In Page Selector tab: Create new Page with Page Id wcm and Title WCM Editor

images/author/download/attachments/75137355/wcm-1.4.4-f.png

  • Save Dialog

  • Edit Node WCM Editor's page

images/author/download/attachments/75137355/wcm-1.4.4-h.png images/author/download/attachments/75137355/wcm-1.4.4-f-2.png

  • Editing the page: Add a WCM Editor into the empty layout of the page.

images/author/download/attachments/75137355/wcm-1.4.4-i.png

  • Editing the page: Check that WCM Editor portlet has access permission to /wcm group with all membership type.

images/author/download/attachments/75137355/wcm-1.4.4-j.png

  • Save and Close

  • Check that under Group menu there is a new menu called wcm's pages with WCM Editor node.

images/author/download/attachments/75137355/wcm-1.4.4-l.png

  • Access and check that you see a empty WCM editor with no data.

images/author/download/attachments/75137355/wcm-1.4.4-m.png

1.4.5 Validate installation

  • Create a new upload to check media repository is correctly configured.

images/author/download/attachments/75137355/wcm-1.4.5-a-1.png images/author/download/attachments/75137355/wcm-1.4.5-a-2.png

  • Create a "Hello World!" new post

images/author/download/attachments/75137355/wcm-1.4.5-b-1.png images/author/download/attachments/75137355/wcm-1.4.5-b-2.png

1.5 Import demo GateIn WCM repository

This step is optional but a quick way to start getting familiar with GateIn WCM is to import a site.

1.5.1 Download demo data package

You can download a prepackaged site under this link:

https://dl.dropboxusercontent.com/u/22093229/pdf/data.zip

1.5.2 Make backup of current data

  • Stop GateIn Portal / JBoss Portal

  • Make a backup of GateIn Portal / JBoss Portal data folder

cd $GATEIN
zip -r data-backup.zip standalone/data

1.5.3 Install demo data package

  • Unzip data.zip into GateIn Portal data folder, replacing all content

unzip data.zip -d $GATEIN/standalone/

1.5.4 Run GateIn Portal / JBoss Portal Platform

  • Start GateIn Portal / JBoss Portal Platform

cd $GATEIN
bin/standalone.sh
  • Browse in TicketMonster's Magazine

images/author/download/attachments/75137355/wcm-1.5.4-b-1.png images/author/download/attachments/75137355/wcm-1.5.4-b-2.png images/author/download/attachments/75137355/wcm-1.5.4-b-3.png images/author/download/attachments/75137355/wcm-1.5.4-b-4.png

  • Or browse in WCM Editor managing content

images/author/download/attachments/75137355/wcm-1.5.4-c-1.png images/author/download/attachments/75137355/wcm-1.5.4-c-2.png images/author/download/attachments/75137355/wcm-1.5.4-c-3.png images/author/download/attachments/75137355/wcm-1.5.4-c-4.png

1.6 Feedback !

Please, feel free to give us feedback and suggestions for future modifications !

https://community.jboss.org/en/gatein?view=discussions

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 13:39:54 UTC, last content change 2014-02-25 15:17:56 UTC.